<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>


  </title>
</head>
<body>

<ul class="check">
  <li><label><input id="parentId" type="checkbox" name="all" value="0" /><strong>Check All</strong></label></li>
  <li><label><input class="child" type="checkbox" name="hobbies[]" value="1" />One</label></li>
  <li><label><input class="child" type="checkbox" name="hobbies[]" value="2" />Two</label></li>
  <li><label><input class="child" type="checkbox" name="hobbies[]" value="3" />Three</label></li>
  <li><label><input class="child" type="checkbox" name="hobbies[]" value="4" />Four</label></li>
  <li><label><input class="child" type="checkbox" name="hobbies[]" value="5" />Five</label></li>

</ul>

<script src="jquery-1.10.1.min.js" type="text/javascript"></script>
<script type="text/javascript">

    $('input#parentId').on('click',function(){

      var isCheck = $(this).is(':checked');
      console.log(isCheck);
      $('input[type="checkbox"].child').prop('checked',isCheck);
    });

</script>



</body>
</html>
